package main

import (
	"fmt"
	"github.com/go-ini/ini"
	"log"
)

func main() {
	// configuration
	conf, err := ini.Load("default.ini")
	if err != nil {
		log.Fatalln(err)
	}

	key, err := conf.Section("mysql").GetKey("log_file_path")
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Println(key.String())

	key, err = conf.Section("server").GetKey("port")
	if err != nil {
		log.Fatalln(err)
	}
	fmt.Println(key.Int())
}
